package br.com.registrofinancas.controller;

import android.view.View;
import android.view.View.OnClickListener;
import br.com.registrofinancas.R;
import br.com.registrofinancas.view.CategoryActivity;

/**
 * Controller para Category Activity.
 * Singleton.
 */
/* Listener para ListView */
public class CategoryActivityController implements OnClickListener {

	private static CategoryActivityController instance = new CategoryActivityController();
	private CategoryActivity activity;
	
	/**
	 * Construtor
	 */	
	private CategoryActivityController() {
	}
	
	/**
	 * Retorna a única instância da classe.
	 * @return CategoryActivityController
	 */
	public static CategoryActivityController getInstance() {
		return instance;
	}
	
	/**
	 * Retorna a Activity que envia os enventos à este controller.
	 * @return CategoryActivity
	 */
	public CategoryActivity getActivity() {
		return activity;
	}

	/**
	 * Define o Activity que envia os enventos à este controller.
	 * @return CategoryActivity
	 */
	public void setActivity(CategoryActivity activity) {
		this.activity = activity;
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void onClick(View v) {
		if (R.id.activity_category_ll_date_bt_move_right == v.getId()) {
			moveRightPressed();
		} else if (R.id.activity_category_ll_date_bt_move_left == v.getId()) {
			moveLeftPressed();
		}
	}

	/**
	 * Lida com o evento de Botão para a direita pressionado.
	 */
	protected void moveRightPressed() {
		
	}
	
	/**
	 * Lida com o evento de Botão para a esquerda pressionado.
	 */	
	protected void moveLeftPressed() {
		
	}
	
}
